module.exports = {
  publicPath: '',
  lintOnSave: true,
  productionSourceMap: false,
  chainWebpack: config => {
    config.plugin('html').tap(args => {
      args[0].env = process.env.NODE_ENV
      return args
    })
    // 全局解析Sass
    const oneOfsMap = config.module.rule('scss').oneOfs.store
    oneOfsMap.forEach(item => {
      item
        .use('sass-resources-loader')
        .loader('sass-resources-loader')
        .options({
          // 引入全局sass文件
          resources: ['./src/assets/css/mixin.scss']
        })
        .end()
    })
  },
  configureWebpack: {
    // 取消打包后文件大于244k警告
    performance: {
      hints: false
    }
  }
}
